package cc.wenshixin.features;

import javax.swing.*;
import java.awt.*;

public class BorderTest {
    private static final int WIDTH = 300;
    private static final int HEIGHT = 200;

    public static void main(String[] args) {
        JFrame jf = new JFrame("边框样式");
        jf.setSize(WIDTH, HEIGHT);
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JPanel contentPane = new JPanel();
        jf.add(contentPane);

        JButton btnConfirm = new JButton("确定");
        JButton btnCacel = new JButton("取消");

        contentPane.add(btnConfirm);
        contentPane.add(btnCacel);

        btnConfirm.setBorder(BorderFactory.createLineBorder(Color.red));

        jf.setVisible(true);
    }
}
